<%-- 
    Document   : index
    Created on : 23 лип 2012, 21:12:23
    Author     : Volodymyr Lavrynovych <volodya.lavrynovych@gmail.com>
--%>

<%@page import="org.springframework.security.core.context.SecurityContextHolder"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String username = "Anonymous";
%>
<sec:authorize access="isAuthenticated()">
    <% username = SecurityContextHolder.getContext().getAuthentication().getName(); %>
</sec:authorize>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello, <%=username%>!</h1>
    </body>
</html>
